﻿Imports SdlDotNet.Graphics
Imports SdlDotNet.Graphics.Sprites
Imports System.Drawing

Public Class Avatar
    Public Name As String = ""

    Public LargeSprite As Sprite
    Public MediumSprite As Sprite
    Public SmallSprite As Sprite

    Public Sub New(ByVal name As String, ByVal imageLocation As String, ByVal position As Point)
        Me.Name = name

        Dim spriteSurface As New Surface(imageLocation)
        LargeSprite = New Sprite(spriteSurface, position)
        SmallSprite = New Sprite(spriteSurface.CreateScaledSurface(0.25, 0.25, True), position)
        MediumSprite = New Sprite(spriteSurface.CreateScaledSurface(0.49, 0.49, True), position)
    End Sub

    Public Sub DrawLarge(ByRef display As Surface)
        display.Blit(LargeSprite)
    End Sub

    Public Sub DrawLarge(ByRef display As Surface, ByVal position As Point)
        display.Blit(LargeSprite, position)
    End Sub

    Public Sub DrawMedium(ByRef display As Surface)
        display.Blit(MediumSprite)
    End Sub

    Public Sub DrawMedium(ByRef display As Surface, ByVal position As Point)
        display.Blit(MediumSprite, position)
    End Sub

    Public Sub DrawSmall(ByRef display As Surface)
        display.Blit(SmallSprite)
    End Sub

    Public Sub DrawSmall(ByRef display As Surface, ByVal position As Point)
        display.Blit(SmallSprite, position)
    End Sub

    Public Sub Dispose()
        LargeSprite.Dispose()
        MediumSprite.Dispose()
        SmallSprite.Dispose()
    End Sub
End Class
